package org.example.what_mall.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class GlobalException extends RuntimeException{
    private int code;
    private String message;

    public GlobalException(GlobalCode globalCode){
        this.code = globalCode.getCode();
        this.message = globalCode.getMessage();
    }
}
